﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConvertToExcel
{
    public class Part
    {        
        [CsvField(Name = "Part Name",Index=1)]
        public string PartName { get; set; }

        [CsvField(Name = "Part Type", Index = 2)]
        public string PartType { get; set; }

        [CsvField(Name = "Position Number", Index = 3, Nullable = true)]
        public int Position { get; set; }

        [CsvField(Name = "Description", Index = 4)]
        public string Description { get; set; }

        [CsvField(Name = "Material Number", Index = 5, Nullable = true)]
        public double MaterialCount { get; set; }

        [CsvField(Name = "Weight", Index = 6)]
        public double Weight { get; set; }

        [CsvField(Name = "CoG (x)", Index = 7)]
        public double CoGx { get; set; }

        [CsvField(Name = "CoG (y)", Index = 8)]
        public double CoGy { get; set; }

        [CsvField(Name = "CoG (z)", Index = 9)]
        public double CoGz { get; set; }

        [CsvField(Name = "Cost Code", Index = 10)]
        public string CostCode { get; set; }

        [CsvField(Name = "Component Name", Index = 11)]
        public string ComponentName { get; set; }

        [CsvField(Name = "Area", Index = 12)]
        public double Area { get; set; }
    }

    /// <summary>
    /// 零件记录行
    /// </summary>
    public class PartRow
    {
        /// <summary>
        /// 代号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string Specificat { get; set; }
        /// <summary>
        /// 材料
        /// </summary>
        public string Material { get; set; } 
        /// <summary>
        /// 数量
        /// </summary>
        public int Number { get; set; } 
        /// <summary>
        /// 单重
        /// </summary>
        public double SingleWeight { get; set; } 
        /// <summary>
        /// 总重
        /// </summary>
        public double TotalWeight { get; set; } 
    }
}
